<!DOCTYPE html>
<html lang="en">
<head>
    <!-- BEGIN META -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Olive Enterprise">
    <!-- END META -->
    <title>员工自助修改信息审核页面</title>
    <link href="__PUBLIC__/User/update/css/layui/src/css/layui.css" rel="stylesheet">
    <link rel="shortcut icon" type="image/x-icon"  href="__PUBLIC__/User/update/img/ooopic_1497861131.ico">
    <!-- BEGIN STYLESHEET-->
    <link href="__PUBLIC__/User/update/css/bootstrap3.3.4.css" rel="stylesheet">
    <link href="__PUBLIC__/User/update/css/bootstrap-reset.css" rel="stylesheet">
    <link href="__PUBLIC__/User/update/css/style.css" rel="stylesheet">
    <link href="__PUBLIC__/User/update/css/style-responsive.css" rel="stylesheet">
    <link href="__PUBLIC__/User/update/assets/morris.js-0.4.3/morris.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/User/css/ion.calendar.css">

    <script src="__PUBLIC__/User/newjs/jquery.js"></script>
    <script src="__PUBLIC__/User/update/css/layer/layer/layer.js" ></script>
    <link href="__PUBLIC__/User/update/css/clndr.css" rel="stylesheet">
    <script src="__PUBLIC__/User/page/js/bootstrap.min-3.0.3.js"></script>
    <script src="__PUBLIC__/User/newjs/moment.min.js"></script>
    <script src="__PUBLIC__/User/newjs/moment.zh-cn.js"></script>
    <!--[if lt IE 9]>
    <script src="__PUBLIC__/User/update/js/html5shiv.js"></script>
    <script src="__PUBLIC__/User/update/js/respond.min.js"></script>
    <![endif]-->
    <style>
        body{
            font-family: '微软雅黑';
            background: #fff;
        }
        .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td{
            /*line-height: 2.4285;*/
            line-height: 1.0 !important;
        }
        /**郑春阳*/
        .reset_btn{
            margin-left: 20px;
            background-color:  #ccc !important;
            border:1px solid  #ccc !important;
        }
        .control-label{
            width: 25%;
            font-size:12px !important;
            font-weight: normal !important;
            color: rgb(51,51,51);
            margin-top: 3px;
        }
        .sp_result{
            font-size:12px !important;
            font-weight: normal !important;
            color: rgb(51,51,51);
            text-align: center;
        }
        .change_content{
            font-size:13px !important;
            font-weight: bold !important;
            color: rgb(51,51,51);
            text-align:center;
        }
        .adv-table table tr td{
            padding: 4px;
        }
        .form-control[readonly],input[readonly]{
            margin-top: 5px;
            background: #fff !important;
            /*border: 1px solid #ccc;*/
            border-radius:1px;
            padding: 4px;
            height:27px !important;
            color:#333333;
            line-height: 31px;
            font-size: 12px;
            text-align: center;
            border: none;
        }
        .form-group>label{
            margin-top: 10px;
        }
        .layer_input input{
            border: 1px solid #ccc !important;
        }
        .zd_table,.gradeX{
            color: rgb(51,51,51);
        }
        .gradeX{
            font-size: 12px;
        }
        /*文件上传列表*/
        .layui-layer-molv .layui-layer-title{
            color:#5B636B;
            background: #fff;
            padding: 0;
            text-align: center;
        }
        .layui-layer-dialog .layui-layer-content{
            padding-top: 0;
            padding-bottom: 0;
        }
        .layui-layer-btn{
            text-align: center;
        }
        .layui-layer-molv .layui-layer-btn a{
            background: #3383da;
        }
        .file_handle>span{
            margin-left: 20px;
            font-size:14px;
        }
        .file_area tr>td:nth-child(1){
            width: 60%;
            font-size:14px;
        }
        .table{
            margin-bottom: 0;
        }
        /*修改结束*/
        .control-label{
            width: 25%;
        }
        .col-sm-3{
            padding-left: 0px;
        }

        .col-sm-9{
            padding-left: 0px;
        }
        .yy{
            border:1px solid #ccc !important;
            color:black;
            background: #fff !important;
            text-align: left !important;
            text-indent: 1em;
        }

        .menu_box ul li ul.sub_menu li {
            padding-left: 0;
        }
        .menu_box ul li ul.sub_menu li a {
            padding: 0;
            font-family:Microsoft YaHei, Tahoma, Helvetica, Arial, "\5b8b\4f53", sans-serif !important;
            font-size: 12px !important;
        }
        .menu_box ul li h3{
            font-size: 15px;
            font-weight: bold;
        }
        .top_left{
            width: 100%;
            position: relative;
        }
        .top_left div{
            text-align: center;

        }
        .back_btn{
            position: absolute;
            top:0;
            right: 80px;
        }
        .but{
            height:30px;
            font-size:12px !important;
            padding: 6px 12px;
            margin-bottom: 8px;
            font-weight: 400;
            line-height: 1.42857143;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
        }
        .btn-info{
            color: rgb(255, 255, 255);
            background-color:  #3383da;
            border:1px solid  #3383da;
        }
        .top_box{
            border-bottom: 1px solid #d5d5d5;
            box-shadow: 0px 2px 1px #efefef;
            background: white;
            box-sizing: border-box;
            position: relative;
            clear: both;
            line-height: 40px;
            height: 40px;
            /*background-color: #0097B4; ;*/
            /*background: #bae3f9;*/
        }
        .panel{
            clear:both;
        }
        .search_area {
            clear: both;
            border: 1px solid #d5d5d5;
            border-radius: 3px;
            margin-bottom: 6px;
        }
        .search_area_content {
            height: 35px;
            margin-top: 1px;
            background-color: rgb(248, 248, 248);
            clear: both;
        }
        .search_area_content span>.select_div, .search_area_content span>.input_div {
            display: inline-block;
            padding-top: 2px;
        }
        .search_area input, .search_area select {
            margin-left: 5px;
            border: 1px solid #ccc;
            color: #444;
            outline: none;
            padding: 4px;
            font-size: 13px;
            background: #fff;
        }
        .search_area input[readonly] {
            width: 186px;
            margin-top: 0 !important;
        }
        .search_area select {
            width: 184px;
        }
        .search_btn,.reset_btn{
            height: 26px;
            padding: 3px 20px;
            margin: 2px 8px 3px 8px;
        }
        .filebtn{
            width:71px;
            background-color: #ccc;
            border: 1px solid #ccc;
            padding: 6px 12px;
            color: rgb(51,51,51);
            display: block;
            margin: 1px auto;
        }
    </style>
    <script>
        //初始化日历插件
        $(function () {
            //时间日期插件
            $('.date').each(function () {
                $(this).ionDatePicker({
                    lang: 'zh-cn',
                    format: 'YYYY-MM-DD',
                    years: '100'
                });
            });
        })

    </script>
</head>
<body>
<script src="__PUBLIC__/User/newjs/ion.calendar.js"></script>
<!-- BEGIN PANEL SECTION -->
<div class="top_box">
    <div class="top_left">
        <div><h4>个人信息历史审核记录</h4></div>
        <div class="back_btn">
            <ul>
                <li>
                    <button class="but btn-info" style="width:70px;margin-left:50px;color:white;font-size:18px;" id="fh"  >
                        返回
                    </button>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="search_area">
    <div class="search_area_content">
        <form action="__ACTION__" method="get" id="form1">
            <input type="hidden" name="uuid" value="<?php echo $uuid; ?>">
            <input type="hidden" name="token" value="<?php echo $token; ?>">
            <span style="margin-left:20px;margin-right:15px;font-size:12px; font-weight:bold">按条件检索</span>
            <span style="margin-right:15px;">审批状态
                <div class="select_div">
                     <select name="sp_type" style="width:90px">
                         <?php $sp_type=I('get.sp_type');?>
                         <option value="">请选择</option>
                         <option value="1" <?php if($sp_type==1) echo 'selected';?>>审批中</option>
                         <option value="2" <?php if($sp_type==2) echo 'selected';?>>审批结束</option>
                     </select>
                </div>
            </span>
            <span style="margin-right:15px;">子集名称
                <div class="select_div">
                    <select name="menu">
                        <option value="">请选择</option>
                        <?php $menu=I('get.menu');
                            foreach($menus as $k=>$v){
                            if($v['display']){
                        ?>
                        <option value="<?php echo $v['name'];?>" <?php if($v['name']==$menu) echo 'selected';?>><?php echo $v['caption'];?></option>
                        <?php }} ?>
                    </select>
                </div>
            </span>
            <span style="margin-right:20px;">起止时间
                <div class="input_div">
                    <?php $ks_sj=I('get.ks_sj');$js_sj=I('get.js_sj');?>
                    <input style="width:95px" class="date" name="ks_sj" value="<?php echo $ks_sj;?>" type="text" readonly > --
                    <input style="width:95px" class="date" name="js_sj" value="<?php echo $js_sj;?>" type="text" readonly>
                </div>
            </span>
            <span>
                <input style="width:70px" type="submit" class="but btn-info search_btn" value="搜索">
                <input style="width:70px" type="reset" class="but btn-info reset_btn" value="重置">
            </span>
        </form>
    </div>
</div>
<section class="panel" >
    <?php if(!$info){ ?>
        <div style="margin-left:20px;color:red"><p>根据您的搜索条件未查询到数据,请重新输入搜索条件!</p></div>
    <?php }else{
        foreach($info as $k=>$v){ ?>
        <div style="margin-bottom:20px">
            <div class="adv-table">
                <div style="padding:5px 0 5px 10px ;">
                    <span style="font-size:16px; color:rgb(51,51,51);">提交审批时间 : <?php echo date('Y-m-d H:i',$v['time']);?></span>&nbsp;&nbsp;&nbsp;
                    <span style="font-size:16px;color:rgb(51,51,51);">审批状态 : <?php echo $v['sp_bz']?'审批结束':'审批中'; ?></span>
                </div>
                <!-------------------------员工基本信息开始---------------------------------->
                <?php if($v['base_info']){ ?>
                <div style="overflow: auto;" class="col">
                    <table class="display table table-bordered" >
                        <tr>
                            <th class="col-sm-6 col-sm-6 label-primary" style="width:14%;background: #669acc;text-align:center;color:#fff;padding:2px;" >
                                <h4 class="base_info" style="font-size:16px;margin:5px;">审批结果</h4>
                            </th>
                            <th class="col-sm-6 col-sm-6 label-primary" style="width:16%; background: #669acc; text-align: center; color: #fff; padding: 2px;" >
                                <h4 style="font-size:16px;margin:5px;">字段名</h4>
                            </th>
                            <th class="col-sm-6 col-sm-6 label-primary" style="width:35%; background: #669acc; text-align: center; color: #fff; padding: 2px;" >
                                <h4 class="base_info" style="font-size:16px;margin:5px;">员工基本信息(更改后)</h4>
                            </th>
                            <th class="col-sm-6 col-sm-6 label-primary" style="width:35%;  background: #669acc; text-align: center; color: #fff; padding: 2px;" >
                                <h4 class="base_info" style="font-size:16px;margin:5px;">员工基本信息(更改前)</h4>
                            </th>
                        </tr>
                        <?php foreach($v['base_info']['sublist'] as $k1=>$v1){ ?>
                        <tr>
                            <?php if(!$v['sp_bz']){
                                      $sp_jg = '';
                                  }else if($v1['sp_info'] && $v1['sp_info']['sp_type']==1){
                                      $sp_jg = '通过';
                                  }elseif($v1['sp_info'] && $v1['sp_info']['sp_type']==0){
                                      $sp_jg = '不通过';
                                  }
                            ?>
                            <td class="col-sm-3 col-sm-3 control-label" style="text-align:center;width:14%">
                                <div class="form-group">
                                    <label class="col-sm-12 col-sm-12 sp_result" style="cursor:pointer"> <?php echo $sp_jg; ?></label>
                                </div>
                            </td>
                            <td class="col-sm-3 col-sm-3 control-label" style="width:16%">
                                <div class="form-group">
                                    <label class="col-sm-12 col-sm-12 change_content" style="cursor:pointer" title="<?php echo $v1['caption'];?>"><?php echo mb_substr($v1['caption'],0,8,'utf-8');?></label>
                                </div>
                            </td>
                            <td class="col-sm-3 col-sm-3 control-label" style="width:35%">
                                <div class="form-group">
                                    <div class="col-sm-12">
                                        <?php if($v1['type']=='FILE'){ ?>
                                        <button class="filebtn get_base_info"  menu="BO_CASC_HR_YGRS" zd_name="{$k1}" val="<?php echo $v1['value'];?>" type="edit" >查看</button>
                                        <?php }else{ ?>
                                        <input class="form-control" style="cursor:pointer" title="<?php echo $v1['value'];?>" type="text" name="bumen" value="<?php echo $v1['value'];?>" readonly>
                                        <?php } ?>
                                    </div>
                                </div>
                            </td>
                            <td class="col-sm-3 col-sm-3 control-label" style="width:35%">
                                <div class="form-group">
                                    <div class="col-sm-12">
                                        <?php if($v1['type']=='FILE'){ ?>
                                        <button class="filebtn get_base_info"  menu="BO_CASC_HR_YGRS" zd_name="{$k1}" val="<?php echo $v1['value'];?>" type="former" >查看</button>
                                        <?php }else{ ?>
                                        <input class="form-control"  style="cursor:pointer" title="<?php echo $v1['oldvalue'];?>" type="text" name="bumen" value="<?php echo $v1['oldvalue'];?>" readonly>
                                        <?php } ?>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <?php   if($v['sp_bz'] && $v1['sp_info'] && $v1['sp_info']['sp_type']==0){
                                    $style='style="display:black"';
                                }else{
                                    $style='style="display:none"';
                                }
                        ?>
                        <tr <?php echo $style;?>>
                        <td class="col-sm-3 col-sm-3 control-label"  colspan="15">
                            <div style="position: absolute;color:red;line-height: 27px;margin-top:4px;">不通过意见:　</div>
                            <div style="position: relative;left:80px;width:1200px;color:red">
                                <input class="form-control yy" style="cursor:pointer" title="<?php echo $v1['sp_info']['reason'];?>" value="<?php if($v1['sp_info']['sp_type']==0) echo $v1['sp_info']['reason'];?>" type="text" readonly>
                            </div>
                        </td>
                        </tr>
                        <?php } ?>
                    </table>
                </div>
                <?php } ?>
                <!-------------------------员工基本信息结束---------------------------------->

                <!-------------------------扩展子集开始---------------------------------->
                <?php foreach($v['zj_info'] as $k1=>$v1){
                    $val = $v1['value'];
                    $keys = array_keys($val);
                ?>
                <div style="overflow: auto;" class="col">
                    <table  class="table table-bordered" >
                        <tr>
                            <td style="background: #669acc; color: #fff; padding: 2px;" >
                                <h4 title="zijibaioji" style="float: left;font-size: 16px;margin:5px"><?php echo $v1['caption'];?></h4>
                            </td>
                        </tr>
                        <!---------------------字段名------------------------->
                        <tr class="zd_table">
                            <th><div style=" text-align: center;width: 62px;">序号</div></th>
                            <th><div style=" text-align: center; width: 107px;">审批结果</div></th>
                            <th><div style=" text-align: center; width: 62px;">类型</div></th>
                            <?php foreach($val[$keys[0]]['info'] as $h=>$j){ ?>
                            <th><div style="cursor:pointer;text-align: center;" title="<?php echo $j['caption'];?>"><?php echo mb_substr($j['caption'],0,9,'utf-8');?></div></th>

                            <?php } ?>
                        </tr>
                        <!---------------------数据--------------------------->
                        <?php $xuhao = 0;
                              foreach($val as $f=>$g){
                                  $xuhao++;
                                  if($g['type']=='insert'){
                                      $type_name = '新增';
                                  }elseif($g['type']=='update'){
                                      $type_name = '更改';
                                  }else{
                                      $type_name = '删除';
                                  }
                                  if(!$v['sp_bz']){
                                      $sp_jg = '';
                                  }else if($g['sp_info'] && $g['sp_info']['sp_type']==1){
                                      $sp_jg = '通过';
                                  }elseif($g['sp_info'] && $g['sp_info']['sp_type']==0){
                                      $sp_jg = '不通过';
                                  }
                        ?>
                        <tr class="gradeX">
                            <td style="text-align: center; width: 62px;"><span style="line-height:27px;"><?php echo $xuhao;?></span></td>
                            <td style="text-align: center; width: 107px;"><span style="line-height:27px;"><?php echo $sp_jg; ?></span></td>
                            <td style="text-align: center; width: 62px;"><span style="line-height:27px;"><?php echo $type_name; ?></span></td>
                            <?php foreach($g['info'] as $a=>$b){
                                if($b['change_type']==1 && $g['type']=='update'){
                                    $style = 'style="color:red;cursor:pointer;display:block;margin: 0 auto;"';
                                    $class = 'class="up"';
                                }else{
                                    $style = 'style="cursor:pointer;display:block;margin: 0 auto;"';
                                    $class = '';
                                }
                            ?>
                            <td>
                                <?php if($b['type']=='FILE'){
                                    if($b['change_type']==1 && $g['type']=='update'){
                                        $style = 'style="color:red;"';
                                    }else{
                                        $style = '';
                                    }
                            ?>
                                <button class="filebtn get_zj_file" type="<?php echo $g['type'];?>"  val="<?php echo $b['value'];?>" <?php echo $style; ?> >查看</button>
                                <?php }else{ ?>
                                <input type="text" title="<?php echo $b['value'];?>" <?php echo $style; echo $class; ?> zd_name="<?php echo $b['caption']; ?>" oldval="<?php echo $b['oldvalue'];?>" value="<?php echo $b['value'];?>" readonly>
                                <?php } ?>
                            </td>
                            <?php } ?>
                        </tr>
                        <?php if($v['sp_bz'] && $g['sp_info'] && $g['sp_info']['sp_type']==0){
                                  $style='style="display:black"';
                              }else{
                                  $style='style="display:none"';
                              }
                        ?>
                        <tr <?php echo $style;?>>
                        <td class="col-sm-3 col-sm-3 control-label"  colspan="15">
                            <div style="float:left;color:red;line-height: 27px;margin-top:4px;">不通过意见:　</div>
                            <div style="float:left;width:1200px;color:red">
                                <input class="form-control yy" style="cursor:pointer;" title="<?php echo $g['sp_info']['reason'];?>" value="<?php echo $g['sp_info']['reason'];?>" type="text" readonly>
                            </div>
                        </td>
                        </tr>
                        <?php } ?>
                    </table>
                </div>
                <?php } ?>
            <!-------------------------扩展子集结束---------------------------------->
            </div>
        </div>
    <?php }} ?>
</section>
<div class="container" style="text-align:center">
    <div id="page" page="<?php echo I('get.page')?I('get.page'):1;?>"></div>
    <nav aria-label="Page navigation">
        <ul class="pagination" id="pagination"></ul>
    </nav>
</div>
</body>
<script>
    var uuid = '{$uuid}';
    var token = '{$token}';
    $(function(){
        var col = $('.col').find('table').find('tr:eq(1)').find('th');
        $('.col').find('table').find('tr:eq(0)').find('td:eq(0)').attr('colspan',col.length);
        $('.col').find('table').find('tr:last').find('td:eq(0)').attr('colspan',col.length);

        $('.shows').parents('table').find('tr:gt(0)').hide();

        /****************************查看修改之前的数据***************************/
        $('.up').click(function(){
            var zd_name = $(this).attr('zd_name');
            var oldval = $(this).attr('oldval');
            var val = $(this).val();
            layer.open({
                type: 1,
                title: false, //不显示标题栏
                closeBtn: false,
                area: '400px;',
                shade: 0.8,
                id: 'LAY_layuipro', //设定一个id，防止重复弹出
                btn: ['确定'],
                moveType: 1 ,//拖拽模式，0或者1
                content: '<div style="padding: 50px;line-height:22px;color:black;" class="layer_input"><div style="text-align:center;font-size:18px;"><span>'+zd_name+'</span></div><br><div class="form-group"><label class="col-sm-3 col-sm-3 control-label">修改后</label><div class="col-sm-9"><input style="color:black;cursor:pointer" title="'+val+'" class="form-control" value="'+val+'" type="text" readonly></div></div><br><div class="form-group"><label class="col-sm-3 col-sm-3 control-label" >修改前</label><div class="col-sm-9"><input class="form-control" style="color:black;cursor:pointer" title="'+oldval+'" type="text" value="'+oldval+'" readonly></div></div>',
                success: function(layero){
                    var btn = layero.find('.layui-layer-btn');
                    btn.css('text-align', 'center');
                }
            });
        });


        /*************************检测搜索时间************************/
        $('.search_btn').click(function(){
            var ks_sj   = $('input[name=ks_sj]').val();
            var js_sj   = $('input[name=js_sj]').val();
            var dateObj = new Date();

            if(ks_sj && !js_sj){
                var preDate = new Date(dateObj.getTime() + 24*60*60*1000); //加一天
                var oldtime = preDate.toLocaleDateString();
                $('input[name=js_sj]').val(oldtime);
            }else if(!ks_sj && js_sj){
                var preDate = new Date(dateObj.getTime() - 30*24*60*60*1000); //前30天
                //alert(preDate);return false;
                var oldtime = preDate.toLocaleDateString();
                $('input[name=ks_sj]').val(oldtime);
            }else if(ks_sj && js_sj){
                if(js_sj < ks_sj){
                    layer.alert('结束时间不能小于或等于开始时间!');
                    return false;
                }
            }
        });

        /************************搜索条件重置功能********************/
        $('.reset_btn').click(function(){
            location.href = '/Pc/Check/history/uuid/'+uuid+'/token/'+token;
        });

        /******************************分页****************************/
        var info = "{$info}";
        var z_count = parseInt({$count});
        if(info && z_count>1){
            window.pagObj = $('#pagination').twbsPagination({
                totalPages: z_count,
                visiblePages: 10,
                onPageClick: function (event, page) {
                    console.info(page + ' (from options)');
                }
            }).on('page', function (event, page) {
                console.info(page + ' (from event listening)');
                var getinfo = getUrlKey();
                if(getinfo){
                    location.href = '__CONTROLLER__/history/uuid/'+uuid+'/'+getinfo+'/page/'+page+'/token/'+token;
                }else{
                    location.href = '__CONTROLLER__/history/uuid/'+uuid+'/page/'+page+'/token/'+token;
                }
            });

        }
    });
    $('#fh').click(function(){
        location.href = '/Pc/Pc/index/id/'+uuid+'/token/'+token;

    })
    /********************整理分页链接的参数***********************/
    function getUrlKey(){
        var sp_type = "<?php echo I('get.sp_type');?>";
        var menu    = "<?php echo I('get.menu');?>";
        var ks_sj   = "<?php echo I('get.ks_sj');?>";
        var js_sj   = "<?php echo I('get.js_sj');?>";
        if(sp_type && menu && ks_sj){
            var getinfo = 'sp_type/'+sp_type+'/menu/'+menu+'/ks_sj/'+ks_sj+'/js_sj/'+js_sj;
        }else if(sp_type && menu){
            var getinfo = 'sp_type/'+sp_type+'/menu/'+menu;
        }else if(menu && ks_sj){
            var getinfo = 'menu/'+menu+'/ks_sj/'+ks_sj+'/js_sj/'+js_sj;
        }else if(sp_type && ks_sj){
            var getinfo = 'sp_type/'+sp_type+'/ks_sj/'+ks_sj+'/js_sj/'+js_sj;
        }else if(sp_type){
            var getinfo = 'sp_type/'+sp_type;
        }else if(menu){
            var getinfo = 'menu/'+menu;
        }else if(ks_sj){
            var getinfo = 'ks_sj/'+ks_sj+'/js_sj/'+js_sj;
        }
        return getinfo;
    }

    /*************************员工基本信息附件查看***********************/
    $('.get_base_info').click(function(){
        var type = $(this).attr('type');
        var val = $(this).attr('val');
        if(val){
            val = val.split('--');
            //var html = '<table class="table table-hover file_area"><tr><td>2.pdf</td><td class="file_handle"><span>新增</span><span><a href="">下载</a></span></td></tr></table>';
            var html = '<table class="table table-hover file_area">';
            for(var i=0;i<val.length;i++){
                var _v = val[i].split('@@');
                if(type == 'former'){
                    if(_v[2] != 2){
                        html += '<tr><td>'+_v[0]+'</td><td class="file_handle"><span><a href="'+_v[1]+'">下载</a></span></td></tr>';
                    }
                }else{
                    if(_v[2] ==1){
                        var zt = '原有';
                    }else if(_v[2] == 2){
                        var zt = '新增';
                    }else if(_v[2] == 3){
                        var zt = '修改';
                    }else if(_v[2] == 4){
                        var zt = '删除';
                    }
                    html += '<tr><td>'+_v[0]+'</td><td class="file_handle"><span>'+zt+'</span>　<span><a href="'+_v[1]+'">下载</a></span></td></tr>'
                }
            }
            html += '</table>';
            layer.alert(html, {
                title:'查看附件',
                area: '550px',
                skin: 'layui-layer-molv' //样式类名
                ,closeBtn: 0
            });
        }else{
            layer.msg('无附件信息!');
        }
    });

    /*******************************员工子集附件查看**************************/
    $('.get_zj_file').click(function(){
        var val = $(this).attr('val');
        var type = $(this).attr('type');
        if(val){
            val = val.split('--');
            var html = '<table class="table table-hover file_area">';
            for(var i=0;i<val.length;i++){
                var _v = val[i].split('@@');
                if(type == 'delete'){
                    if(_v[2] != 2){
                        html += '<tr><td>'+_v[0]+'</td><td class="file_handle"><span><a href="'+_v[1]+'">下载</a></span></td></tr>';
                    }
                }else{
                    if(_v[2] ==1){
                        var zt = '原有';
                    }else if(_v[2] == 2){
                        var zt = '新增';
                    }else if(_v[2] == 3){
                        var zt = '修改';
                    }else if(_v[2] == 4){
                        var zt = '删除';
                    }
                    html += '<tr><td>'+_v[0]+'</td><td class="file_handle"><span>'+zt+'</span>　<span><a href="'+_v[1]+'">下载</a></span></td></tr>'
                }
            }
            html += '</table>';
            layer.alert(html, {
                title:'查看附件',
                area: '550px',
                skin: 'layui-layer-molv' //样式类名
                ,closeBtn: 0
            });
        }else{
            layer.msg('无附件信息!');
        }


    })
</script>
<?php if($info):?>
<script src="__PUBLIC__/User/page/jquery.twbsPagination.js"></script>
<?php endif;?>
</html>


